import Vue from 'vue';

Vue.prototype.$back = function () {
  const routeLength = window.history.length

  if (routeLength > 1) {
    this.$router.back()
  } else {
    this.$router.replace('/')
  }
}